<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head th:replace="../templates/commons/common2 ::head(~{::title})">
    <meta charset="UTF-8" >
    <!--移动端更好的适应-->
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" th:href="@{/dist/semantic/semantic.min.css}">
    <link rel="stylesheet" th:href="@{/css/my.css}">
    <title>标签管理</title>
</head>
<body>
    <!--导航开始--------------------------------------------->
    <nav th:replace="../templates/commons/common2::menu(3)"></nav>

    <!--导航结束---------------------------------------------->


    <!--中间内容开始------------------------------------------>
    <div class="m-container-small m-padded-large touming">
        <div class="ui container">

            <!-- 中间内容搜索结果开始 -->
            <table class="ui celled table">
                <thead>
                    <tr>
                        <th></th>
                        <th>名称</th>
                        <th>操作</th>
                    </tr>
                </thead>
                <tbody>
                    <tr th:each="tag,iterStat: ${pageInfo.list}">
                        <td th:text="${iterStat.count}">1</td>
                        <td th:text="${tag.name}"></td>
                        <td>
                            <a th:href="@{/admin/toupdateTag/{id}(id=${tag.id})}" class="ui mini teal basic button">编辑</a>
                            <a th:href="@{/admin/deleteTags/{id}(id=${tag.id})}" class="ui mini red basic button" id="delete">删除</a>
                        </td>
                    </tr>
                </tbody>
                <!-- 中间内容分页开始 -->
                <tfoot>
                    <tr>
                        <th colspan="7">
                            <div class="ui inverted divided stackable grid">
                                <div class="three wide column" align="center">
                                    <a th:unless="${pageInfo.isFirstPage}" th:href="@{/admin/tags(pageNum=${pageInfo.hasPreviousPage}?${pageInfo.prePage}:1)}" class="item">上一页</a>
                                </div>
                                <div class="ten wide column" align="center">
                                    <p>第 <span th:text="${pageInfo.pageNum}"></span> 页，共 <span th:text="${pageInfo.pages}"></span> 页 </p>
                                </div>
                                <div class="three wide column" align="center">
                                    <a th:unless="${pageInfo.isLastPage}" th:href="@{/admin/tags(pageNum=${pageInfo.hasNextPage}?${pageInfo.nextPage}:${pageInfo.pages})}" class="item">下一页</a>
                                </div>
                            </div>
                            <div align="center">
                                <a  th:href="@{/admin/toInsert}">
                                    <button type="button" class="ui teal button m-mobile-wide m-margin-top"><i class="pencil icon"></i>新增</button>
                                </a>
                            </div>

                        </th>
                    </tr>
                </tfoot>
                <!-- 中间内容分页结束 -->
            </table>
            <!-- 中间内容搜索结果结束 -->

        </div>
    </div>
    <!--中间内容结束------------------------------------------>
    <br>
    <!--底部内容开始-->
    <footer th:replace="../templates/commons/common2 :: footer">
    </footer>
    <!--底部内容结束------------------------------------------>


    <script th:replace="../templates/commons/common2 :: script"></script>
<script>
    $('.m-menu.m-toggle').click(function () {
        $('.m-item').toggleClass('m-mobile-hide');
    });

    $('.ui.dropdown').dropdown({
        on : 'hover'
    });






</script>
</body>
</html>